package com.atguigu.tingshu.payment.service;

import jakarta.servlet.http.HttpServletRequest;

import java.util.Map;

public interface WxPayService {

    /**
     * 下单或充值选择微信支付，返回小程序拉起微信支付所需参数
     * @param paymentType 支付类型：1301下单  1302充值
     * @param orderNo 订单/充值订单编号
     * @return {{"timeStamp":"","package":"","paySign":"","signType":"RSA","nonceStr":""}}}
     */
    Map<String, String> createJsapi(String paymentType, String orderNo);

    /**
     * 查询订单支付状态
     * @param orderNo
     * @return
     */
    boolean queryPayStatus(String orderNo);

    /**
     * 微信支付成功后异步回调
     * @param request
     * @return
     */
    Map<String, String> wxPayNotify(HttpServletRequest request);
}
